/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package docking;

import java.io.*;

/**
 *
 * @author DJH
 */
public class Main {
    
    

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
                
        DataHandler dataHandler = loadDataHandler();
        GUI gui = new GUI(dataHandler);
        gui.setVisible(true);
        
    }
    
    public static DataHandler loadDataHandler()
    {
         DataHandler e = null;
         try
         {
            FileInputStream fileIn =
                          new FileInputStream("data.ser");
            ObjectInputStream in = new ObjectInputStream(fileIn);
            e = (DataHandler) in.readObject();
            in.close();
            fileIn.close();
            return e;
         }catch(IOException i)
         {
             
             return new DataHandler();
         }catch(ClassNotFoundException c)
         {
             return new DataHandler();
         }
         
    }
}
